package com.muyu.cloud.commodity.domain.req;

import io.swagger.v3.oas.annotations.media.Schema;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * 商品添加请求（新版本）
 * 包含商品基本信息、规格组、规格值和SKU信息
 *
 * @author <a href="mailto:602048165@qq.com">60204</a>
 * @version 1.0
 * @description: 商品添加请求
 * @date 2025/1/15 11:00
 */
@Schema(description = "商品添加请求")
public class ProductAddNewReq {

    // ========== 商品基本信息 ==========
    @Schema(description = "商品名称", required = true)
    @NotBlank(message = "商品名称不能为空")
    private String productName;

    @Schema(description = "商品主图", required = true)
    @NotBlank(message = "商品主图不能为空")
    private String productPic;

    @Schema(description = "商品描述")
    private String description;

    @Schema(description = "市场价", required = true)
    @NotNull(message = "市场价不能为空")
    private BigDecimal marketPrice;

    @Schema(description = "分类ID", required = true)
    @NotNull(message = "分类ID不能为空")
    private Long categoryId;

    @Schema(description = "品牌ID", required = true)
    @NotNull(message = "品牌ID不能为空")
    private Long brandId;

    @Schema(description = "状态：1上架，0下架")
    private Integer status = 1;

    // ========== 规格组信息 ==========
    @Schema(description = "规格组ID", required = true)
    @NotNull(message = "规格组ID不能为空")
    private Long specGroupId;

    // ========== 规格值信息 ==========
    @Schema(description = "规格值ID列表", required = true)
    @NotNull(message = "规格值ID列表不能为空")
    private List<Long> specValueIds;

    // ========== SKU信息 ==========
    @Schema(description = "SKU列表", required = true)
    @Valid
    @NotNull(message = "SKU列表不能为空")
    private List<ProductSkuAddNewReq> skuList;

    // Getters and Setters
    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductPic() {
        return productPic;
    }

    public void setProductPic(String productPic) {
        this.productPic = productPic;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public BigDecimal getMarketPrice() {
        return marketPrice;
    }

    public void setMarketPrice(BigDecimal marketPrice) {
        this.marketPrice = marketPrice;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public Long getBrandId() {
        return brandId;
    }

    public void setBrandId(Long brandId) {
        this.brandId = brandId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getSpecGroupId() {
        return specGroupId;
    }

    public void setSpecGroupId(Long specGroupId) {
        this.specGroupId = specGroupId;
    }

    public List<Long> getSpecValueIds() {
        return specValueIds;
    }

    public void setSpecValueIds(List<Long> specValueIds) {
        this.specValueIds = specValueIds;
    }

    public List<ProductSkuAddNewReq> getSkuList() {
        return skuList;
    }

    public void setSkuList(List<ProductSkuAddNewReq> skuList) {
        this.skuList = skuList;
    }
}
